import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class JugadorB here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class JugadorBack extends Jugador
{
    Jugador j;

    /**
     * An example of a method - replace this comment with your own
     *
     * @param  y   a sample parameter for a method
     * @return     the sum of x and y
     */
    public JugadorBack(Jugador jug)
    {
        j=jug;      
    }

    /**
     * Act - do whatever the JugadorB wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    public void act() 
    {
        setLocation(j.getX(),j.getY());
        rotarImg(dameDireccion());
        
    }   
    
    /**
     * An example of a method - replace this comment with your own
     *
     * @param  y   a sample parameter for a method
     * @return     the sum of x and y
     */
    public void rotarImg(int g)
    {
        turn(g);
    }

    
    

}
